<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta name="robots" content="index, follow, all" />
    <title>Imagine\Image\Metadata\DefaultMetadataReader | Imagine API v1.2.5-dev</title>

            <link rel="stylesheet" type="text/css" href="../../../css/bootstrap.min.css">
        <link rel="stylesheet" type="text/css" href="../../../css/bootstrap-theme.min.css">
        <link rel="stylesheet" type="text/css" href="../../../css/sami.css">
        <script src="../../../js/jquery-1.11.1.min.js"></script>
        <script src="../../../js/bootstrap.min.js"></script>
        <script src="../../../js/typeahead.min.js"></script>
        <script src="../../../sami.js"></script>
        <meta name="MobileOptimized" content="width">
        <meta name="HandheldFriendly" content="true">
        <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
    
    
    </head>

    <body id="class" data-name="class:Imagine_Image_Metadata_DefaultMetadataReader" data-root-path="../../../">
            <div id="content">
        <div id="left-column">
                <div id="control-panel">
                <script>
            $('option[data-version="'+window.projectVersion+'"]').prop('selected', true);
        </script>
        <form id="search-form" action="../../../search.html" method="GET">
            <span class="glyphicon glyphicon-search"></span>
            <input name="search"
                   class="typeahead form-control"
                   type="search"
                   placeholder="Search">
        </form>
    </div>

                <div id="api-tree"></div>

        </div>
        <div id="right-column">
                <nav id="site-nav" class="navbar navbar-default" role="navigation">
        <div class="container-fluid">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-elements">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="../../../index.html">Imagine API v1.2.5-dev</a>
            </div>
            <div class="collapse navbar-collapse" id="navbar-elements">
                <ul class="nav navbar-nav">
                    <li><a href="../../../classes.html">Classes</a></li>
                                            <li><a href="../../../namespaces.html">Namespaces</a></li>
                                        <li><a href="../../../interfaces.html">Interfaces</a></li>
                    <li><a href="../../../traits.html">Traits</a></li>
                    <li><a href="../../../doc-index.html">Index</a></li>
                    <li><a href="../../../search.html">Search</a></li>
                </ul>
            </div>
        </div>
    </nav>

                        <div class="namespace-breadcrumbs">
            <ol class="breadcrumb">
                <li><span class="label label-default">class</span></li>
                        <li><a href="../../../Imagine.html">Imagine</a></li><li class="backslash">\</li><li><a href="../../../Imagine/Image.html">Image</a></li><li class="backslash">\</li><li><a href="../../../Imagine/Image/Metadata.html">Metadata</a></li><li class="backslash">\</li><li>DefaultMetadataReader</li>
            </ol>
        </div>
                <div id="page-content">
                
    <div class="page-header">
        <h1>
            DefaultMetadataReader
                
        </h1>
    </div>

    <p>    class
    <strong>DefaultMetadataReader</strong>        extends <a href="../../../Imagine/Image/Metadata/AbstractMetadataReader.html"><abbr title="Imagine\Image\Metadata\AbstractMetadataReader">AbstractMetadataReader</abbr></a>
</p>

        
    

            <div class="description">
            <p>A metadata reader that actually doesn't try to extract metadata.</p>                                </div>
    
    
    
    
            <h2>Methods</h2>

            <div class="container-fluid underlined">
                    <div class="row">
                <div class="col-md-2 type">
                    <a href="../../../Imagine/Image/Metadata/MetadataBag.html"><abbr title="Imagine\Image\Metadata\MetadataBag">MetadataBag</abbr></a>
                </div>
                <div class="col-md-8 type">
                    <a href="#method_readFile">readFile</a>(string|<a href="../../../Imagine/File/LoaderInterface.html"><abbr title="Imagine\File\LoaderInterface">LoaderInterface</abbr></a> $file)
        
                                            <p>Reads metadata from a file.</p>                </div>
                <div class="col-md-2"><small>from&nbsp;<a href="../../../Imagine/Image/Metadata/AbstractMetadataReader.html#method_readFile"><abbr title="Imagine\Image\Metadata\AbstractMetadataReader">AbstractMetadataReader</abbr></a></small></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    <a href="../../../Imagine/Image/Metadata/MetadataBag.html"><abbr title="Imagine\Image\Metadata\MetadataBag">MetadataBag</abbr></a>
                </div>
                <div class="col-md-8 type">
                    <a href="#method_readData">readData</a>(string $data, resource $originalResource = null)
        
                                            <p>Reads metadata from a binary string.</p>                </div>
                <div class="col-md-2"><small>from&nbsp;<a href="../../../Imagine/Image/Metadata/AbstractMetadataReader.html#method_readData"><abbr title="Imagine\Image\Metadata\AbstractMetadataReader">AbstractMetadataReader</abbr></a></small></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    <a href="../../../Imagine/Image/Metadata/MetadataBag.html"><abbr title="Imagine\Image\Metadata\MetadataBag">MetadataBag</abbr></a>
                </div>
                <div class="col-md-8 type">
                    <a href="#method_readStream">readStream</a>(resource $resource)
        
                                            <p>Reads metadata from a stream.</p>                </div>
                <div class="col-md-2"><small>from&nbsp;<a href="../../../Imagine/Image/Metadata/AbstractMetadataReader.html#method_readStream"><abbr title="Imagine\Image\Metadata\AbstractMetadataReader">AbstractMetadataReader</abbr></a></small></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    array
                </div>
                <div class="col-md-8 type">
                    <a href="#method_extractFromFile">extractFromFile</a>(string|<a href="../../../Imagine/File/LoaderInterface.html"><abbr title="Imagine\File\LoaderInterface">LoaderInterface</abbr></a> $file)
        
                                            <p>Extracts metadata from a file.</p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    array
                </div>
                <div class="col-md-8 type">
                    <a href="#method_extractFromData">extractFromData</a>($data)
        
                                            <p>Extracts metadata from raw data.</p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    array
                </div>
                <div class="col-md-8 type">
                    <a href="#method_extractFromStream">extractFromStream</a>($resource)
        
                                            <p>Extracts metadata from a stream.</p>                </div>
                <div class="col-md-2"></div>
            </div>
            </div>


        <h2>Details</h2>

            <div id="method-details">
                    <div class="method-item">
                    <h3 id="method_readFile">
        <div class="location">in <a href="../../../Imagine/Image/Metadata/AbstractMetadataReader.html#method_readFile"><abbr title="Imagine\Image\Metadata\AbstractMetadataReader">AbstractMetadataReader</abbr></a> at         line 28</div>
        <code>                    <a href="../../../Imagine/Image/Metadata/MetadataBag.html"><abbr title="Imagine\Image\Metadata\MetadataBag">MetadataBag</abbr></a>
    <strong>readFile</strong>(string|<a href="../../../Imagine/File/LoaderInterface.html"><abbr title="Imagine\File\LoaderInterface">LoaderInterface</abbr></a> $file)
        </code>
    </h3>
    <div class="details">
            
    

                    <div class="method-description">
                                    <p>Reads metadata from a file.</p>                                                </div>
                <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string|<a href="../../../Imagine/File/LoaderInterface.html"><abbr title="Imagine\File\LoaderInterface">LoaderInterface</abbr></a></td>
                <td>$file</td>
                <td>the path to the file where to read metadata</td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td><a href="../../../Imagine/Image/Metadata/MetadataBag.html"><abbr title="Imagine\Image\Metadata\MetadataBag">MetadataBag</abbr></a></td>
            <td></td>
        </tr>
    </table>

            
                            <h4>Exceptions</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><a href="../../../Imagine/Exception/InvalidArgumentException.html"><abbr title="Imagine\Exception\InvalidArgumentException">InvalidArgumentException</abbr></a></td>
                <td>in case the file does not exist</td>
            </tr>
            </table>

            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="../../../Imagine/Image/Metadata/MetadataReaderInterface.html#method_readFile"><abbr title="Imagine\Image\Metadata\MetadataReaderInterface">MetadataReaderInterface</abbr>::readFile</a>
                                    </td>
                <td></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_readData">
        <div class="location">in <a href="../../../Imagine/Image/Metadata/AbstractMetadataReader.html#method_readData"><abbr title="Imagine\Image\Metadata\AbstractMetadataReader">AbstractMetadataReader</abbr></a> at         line 40</div>
        <code>                    <a href="../../../Imagine/Image/Metadata/MetadataBag.html"><abbr title="Imagine\Image\Metadata\MetadataBag">MetadataBag</abbr></a>
    <strong>readData</strong>(string $data, resource $originalResource = null)
        </code>
    </h3>
    <div class="details">
            
    

                    <div class="method-description">
                                    <p>Reads metadata from a binary string.</p>                                                </div>
                <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$data</td>
                <td>the binary string to read</td>
            </tr>
                    <tr>
                <td>resource</td>
                <td>$originalResource</td>
                <td>an optional resource to gather stream metadata</td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td><a href="../../../Imagine/Image/Metadata/MetadataBag.html"><abbr title="Imagine\Image\Metadata\MetadataBag">MetadataBag</abbr></a></td>
            <td></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="../../../Imagine/Image/Metadata/MetadataReaderInterface.html#method_readData"><abbr title="Imagine\Image\Metadata\MetadataReaderInterface">MetadataReaderInterface</abbr>::readData</a>
                                    </td>
                <td></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_readStream">
        <div class="location">in <a href="../../../Imagine/Image/Metadata/AbstractMetadataReader.html#method_readStream"><abbr title="Imagine\Image\Metadata\AbstractMetadataReader">AbstractMetadataReader</abbr></a> at         line 54</div>
        <code>                    <a href="../../../Imagine/Image/Metadata/MetadataBag.html"><abbr title="Imagine\Image\Metadata\MetadataBag">MetadataBag</abbr></a>
    <strong>readStream</strong>(resource $resource)
        </code>
    </h3>
    <div class="details">
            
    

                    <div class="method-description">
                                    <p>Reads metadata from a stream.</p>                                                </div>
                <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>resource</td>
                <td>$resource</td>
                <td>the stream to read</td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td><a href="../../../Imagine/Image/Metadata/MetadataBag.html"><abbr title="Imagine\Image\Metadata\MetadataBag">MetadataBag</abbr></a></td>
            <td></td>
        </tr>
    </table>

            
                            <h4>Exceptions</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><a href="../../../Imagine/Exception/InvalidArgumentException.html"><abbr title="Imagine\Exception\InvalidArgumentException">InvalidArgumentException</abbr></a></td>
                <td>in case the resource is not valid</td>
            </tr>
            </table>

            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="../../../Imagine/Image/Metadata/MetadataReaderInterface.html#method_readStream"><abbr title="Imagine\Image\Metadata\MetadataReaderInterface">MetadataReaderInterface</abbr>::readStream</a>
                                    </td>
                <td></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_extractFromFile">
        <div class="location">at         line 24</div>
        <code>            protected        array
    <strong>extractFromFile</strong>(string|<a href="../../../Imagine/File/LoaderInterface.html"><abbr title="Imagine\File\LoaderInterface">LoaderInterface</abbr></a> $file)
        </code>
    </h3>
    <div class="details">
            
    

                    <div class="method-description">
                                    <p>Extracts metadata from a file.</p>                                                </div>
                <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string|<a href="../../../Imagine/File/LoaderInterface.html"><abbr title="Imagine\File\LoaderInterface">LoaderInterface</abbr></a></td>
                <td>$file</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>array</td>
            <td>An associative array of metadata</td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="../../../Imagine/Image/Metadata/AbstractMetadataReader.html#method_extractFromFile"><abbr title="Imagine\Image\Metadata\AbstractMetadataReader">AbstractMetadataReader</abbr>::extractFromFile</a>
                                    </td>
                <td></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_extractFromData">
        <div class="location">at         line 34</div>
        <code>            protected        array
    <strong>extractFromData</strong>($data)
        </code>
    </h3>
    <div class="details">
            
    

                    <div class="method-description">
                                    <p>Extracts metadata from raw data.</p>                                                </div>
                <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td></td>
                <td>$data</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>array</td>
            <td>An associative array of metadata</td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="../../../Imagine/Image/Metadata/AbstractMetadataReader.html#method_extractFromData"><abbr title="Imagine\Image\Metadata\AbstractMetadataReader">AbstractMetadataReader</abbr>::extractFromData</a>
                                    </td>
                <td></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_extractFromStream">
        <div class="location">at         line 44</div>
        <code>            protected        array
    <strong>extractFromStream</strong>($resource)
        </code>
    </h3>
    <div class="details">
            
    

                    <div class="method-description">
                                    <p>Extracts metadata from a stream.</p>                                                </div>
                <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td></td>
                <td>$resource</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>array</td>
            <td>An associative array of metadata</td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="../../../Imagine/Image/Metadata/AbstractMetadataReader.html#method_extractFromStream"><abbr title="Imagine\Image\Metadata\AbstractMetadataReader">AbstractMetadataReader</abbr>::extractFromStream</a>
                                    </td>
                <td></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
            </div>

    
            </div>
                <div id="footer">
        Generated by <a href="http://sami.sensiolabs.org/">Sami, the API Documentation Generator</a>.
    </div>

        </div>
    </div>
    </body>

</html>
